
* REPLICATION CODE FOR
********************************************************************************
* Social and Economic Impacts of Tuungane
* Final Report on the Effects of a Community Driven Reconstruction Program in Eastern Democratic Republic of Congo
* Macartan Humphreys, Raul Sanchez de la Sierra, Peter van der Windt
* Columbia University, June 2012

* Instructions: This code will produce all tables of treatment effects from the main report and save these in 
* your working directory. Each table pulls up an individual clean dataset; IDs allow for merging of these data as needed.
* Information on all variables can be found in the ODS document http://cu-csds.org/wp-content/uploads/2011/03/20110304-ODS-REGISTRATION.pdf 


clear
set mem 100m
ssc install outreg

												*******************
												** PARTICIPATION **
												*******************
	
************************************************************************************************************************
* TABLE 3: ATTENDANCE AT INITIAL MEETING
************************************************************************************************************************

use R_T3_1.dta, clear
	xi: reg  am_16_women_end TUUNGANE [pweight= WEIGHT], cluster(CDCCODE) 
	outreg using T03, se replace

use R_T3_2.dta, clear
	xi: reg   am_17_men_end  TUUNGANE [pweight= WEIGHT], cluster(CDCCODE) 
	outreg using T03, se merge

use R_T3_3.dta, clear
	xi: reg   PART_A1 TUUNGANE [pweight= WEIGHT], cluster(CDCCODE) 
	outreg using T03, se merge

************************************************************************************************************************
* FIGURE 10: Distribution of Number of Meeting Attendees across all Villages
************************************************************************************************************************

	hist PART_A1, freq by(TUU)
	graph export F10.png, replace
	
***********************************************************************************************************************
* FIGURE 11: Meeting Attendees as a Function of Village Size
************************************************************************************************************************

	scatter PART_A1 threshold TOP pop, by(TUU) c(i  l l) s(o i i) sort legend(off) ytitle("Number of Attendees")
	graph export F11.png, replace
	
************************************************************************************************************************
* TABLE 4: Interventions
************************************************************************************************************************

use R_T4_4.dta, clear
	xi: reg  N_INTERV  TUUNGANE [pweight= WEIGHT], cluster(CDCCODE) 
	outreg using T04, se replace

use R_T4_5.dta, clear
	xi: reg   N_INTERVM   TUUNGANE [pweight= WEIGHT], cluster(CDCCODE) 
	outreg using T04, se merge

use R_T4_6.dta, clear
	xi: reg   N_INTERVF    TUUNGANE [pweight= WEIGHT], cluster(CDCCODE) 
	outreg using T04, se merge

use R_T4_7.dta, clear
	xi: reg   MALE_DOM   TUUNGANE [pweight= WEIGHT], cluster(CDCCODE) 
	outreg using T04, se merge

use R_T4_8.dta, clear
	xi: reg   ELDER_DOM TUUNGANE [pweight= WEIGHT], cluster(CDCCODE) 
	outreg using T04, se merge

use R_T4_9.dta, clear
	xi: reg   CHIEF_DOM    TUUNGANE [pweight= WEIGHT], cluster(CDCCODE) 
	outreg using T04, se merge

use R_T4_10.dta, clear
	xi: reg    mfi_T4     TUUNGANE [pweight= WEIGHT], cluster(CDCCODE) 
	outreg using T04, se merge

clear

************************************************************************************************************************
* TABLE 5: SELECTION MECHANISMS
************************************************************************************************************************

use R_T5.dta
	tabulate ELECTIONS1 ELECTIONS2

************************************************************************************************************************
* TABLE 6: Influence of TUUNGANE on Selection Mechanisms
************************************************************************************************************************

use R_T6_11.dta, clear
	xi: reg  ELECTIONS1  TUUNGANE [pweight= WEIGHT], cluster(CDCCODE) 
	outreg using T06, se replace

use R_T6_12.dta, clear
	xi: reg   ELECTIONS2  TUUNGANE [pweight= WEIGHT], cluster(CDCCODE) 
	outreg using T06, se merge

use R_T6_13.dta, clear
	xi: reg   ELECTIONS_LOTT_CON1    TUUNGANE [pweight= WEIGHT], cluster(CDCCODE) 
	outreg using T06, se merge

use R_T6_14.dta, clear
	xi: reg   ELECTIONS_LOTT_CON2   TUUNGANE [pweight= WEIGHT], cluster(CDCCODE) 
	outreg using T06, se merge

use R_T6_15.dta, clear
	xi: reg   mfi_T6 TUUNGANE   [pweight= WEIGHT], cluster(CDCCODE) 
	outreg using T06, se merge

	clear

************************************************************************************************************************
* TABLE 7: MALE DOMINANCE IN COMMITTEES
************************************************************************************************************************

use R_T7, clear
	tabulate N_MAL N_FEM

************************************************************************************************************************
* TABLE 8: TUUNGANE EFFECT ON COMMITTEE COMPOSITION
************************************************************************************************************************

use R_T8_16.dta, clear
	reg  N_FEM TUUNGANE [pweight= WEIGHT], cluster(CDCCODE) 
	outreg using T08, se replace

use R_T8_17.dta, clear
	reg  N_MAL TUUNGANE [pweight= WEIGHT], cluster(CDCCODE) 
	outreg using T08, se merge

use R_T8_18.dta, clear
	reg  TOT TUUNGANE [pweight= WEIGHT], cluster(CDCCODE) 
	outreg using T08, se merge

use R_T8_19.dta, clear
	reg  SHARE TUUNGANE [pweight= WEIGHT], cluster(CDCCODE) 
	outreg using T08, se merge

use R_T8_20.dta, clear
	reg  mfi_T8 TUUNGANE [pweight= WEIGHT], cluster(CDCCODE) 
	outreg using T08, se merge
		
	clear

************************************************************************************************************************
* TABLE 9: TUUNGANE EFFECT ON PUBLIC GOODS PROVISION
************************************************************************************************************************

use R_T9_21.dta
	reg q050_hh_contributed_1 TUUNGANE [pweight=WEIGHT], cluster(CDCCODE)
	outreg using T08, se replace

use R_T9_22.dta
	reg q050_hh_contributed_2 TUUNGANE [pweight=WEIGHT], cluster(CDCCODE)
	outreg using T08, se merge

use R_T9_23.dta
	reg q050_hh_contributed_3 TUUNGANE [pweight=WEIGHT], cluster(CDCCODE)
	outreg using T08, se merge

use R_T9_24.dta
	reg q050_hh_contributed_4 TUUNGANE [pweight=WEIGHT], cluster(CDCCODE)
	outreg using T08, se merge

use R_T9_25.dta
	reg q050_hh_contributed_5 TUUNGANE [pweight=WEIGHT], cluster(CDCCODE)
	outreg using T08, se merge

use R_T9_26.dta
	reg q050_hh_contributed_6 TUUNGANE [pweight=WEIGHT], cluster(CDCCODE)
	outreg using T08, se merge

use R_T9_27.dta
	reg q050_hh_contributed_7 TUUNGANE [pweight=WEIGHT], cluster(CDCCODE)
	outreg using T08, se merge

use R_T9_28.dta
	reg q050_hh_contributed_8 TUUNGANE [pweight=WEIGHT], cluster(CDCCODE)
	outreg using T08, se merge
	
use R_T9_30.dta
	reg mfi_T9 TUUNGANE [pweight=WEIGHT], cluster(CDCCODE)	
	outreg using T08, se merge

	clear
	
************************************************************************************************************************
* TABLE 10: DUTIES OF POLITICAL LEADERS -- FOR WOMEN
************************************************************************************************************************
	
use R_T10_F_31.dta
	reg q078_a_elections TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T10_F, se replace
	
use R_T10_F_34.dta
	reg q078_b_complaints TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T10_F, se merge

use R_T10_F_37.dta
	reg   q078_c_suggestions TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T10_F, se merge

use R_T10_F_40.dta
	reg    q078_d_sensibiliser TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T10_F, se merge

use R_T10_F_43.dta
	reg   q078_corruption TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T10_F, se merge

use R_T10_F_46.dta
	reg   q078_f_consult TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T10_F, se merge

use R_T10_F_49.dta
	reg q078_g_pork TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T10_F, se merge

use R_T10_ME_52.dta
	reg mft_T10 TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T10_F, se merge
	
	clear

************************************************************************************************************************
* TABLE 10: DUTIES OF POLITICAL LEADERS -- FOR MEN
************************************************************************************************************************
	
use R_T10_M_32.dta
	reg q078_a_elections TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T10_M, se replace
	
use R_T10_M_35.dta
	reg q078_b_complaints TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T10_M, se merge

use R_T10_M_38.dta
	reg   q078_c_suggestions TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T10_M, se merge

use R_T10_M_41.dta
	reg    q078_d_sensibiliser TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T10_M, se merge

use R_T10_M_44.dta
	reg   q078_corruption TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T10_M, se merge

use R_T10_M_47.dta
	reg   q078_f_consult TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T10_M, se merge

use R_T10_M_50.dta
	reg q078_g_pork TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T10_M, se merge

use R_T10_ME_53.dta
	reg mft_T10 TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T10_M, se merge
	
	clear

************************************************************************************************************************
* TABLE 10: DUTIES OF POLITICAL LEADERS -- FOR ALL
************************************************************************************************************************
	
use R_T10_A_33.dta
	reg q078_a_elections TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T10_A, se replace
	
use R_T10_A_36.dta
	reg q078_b_complaints TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T10_A, se merge

use R_T10_A_39.dta
	reg   q078_c_suggestions TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T10_A, se merge

use R_T10_A_42.dta
	reg q078_d_sensibiliser TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T10_A, se merge

use R_T10_A_45.dta
	reg   q078_corruption TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T10_A, se merge

use R_T10_A_48.dta
	reg   q078_f_consult TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T10_A, se merge

use R_T10_A_51.dta
	reg q078_g_pork TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T10_A, se merge

use R_T10_ME_54.dta
	reg mft_T10 TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T10_A, se merge
	
	clear
	
************************************************************************************************************************
* TABLE 11: FREE TO PARTICIPATE
************************************************************************************************************************
	
use R_T11_55.dta
	reg Q41b_FREE TUUNG [pweight= WEIGHT], cluster(CDC)	
	outreg using T11, se replace

	clear

												********************
												** ACCOUNTABILITY **
												********************
	
************************************************************************************************************************
* TABLE 12: OBLIGATION AS A CITIZEN TO PARTICIPATE - FOR WOMEN
************************************************************************************************************************

use R_T12_F_56.dta
	reg  q077_a_vote_female TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T12_F, se replace
	
use R_T12_F_59.dta
	reg   q077_b_complain_female TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T12_F, se merge

use R_T12_F_62.dta
	reg   q077_c_suggest_female TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T12_F, se merge

use R_T12_F_65.dta
	reg   q077_d_meetings_female TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T12_F, se merge

use R_T12_F_68.dta
	reg   q077_e_obey_female TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T12_F, se merge

use R_T12_F_71.dta
	reg   q077_f_taxes_female TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T12_F, se merge

use R_T12_F_74.dta
	reg   q077_g_support_female TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T12_F, se merge

use R_T12_ME_77.dta
	reg   mfi_T12_f TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T12_F, se merge
	
	clear	

************************************************************************************************************************
* TABLE 12: OBLIGATION AS A CITIZEN TO PARTICIPATE - FOR MEN
************************************************************************************************************************

use R_T12_M_57.dta
	reg  q077_a_vote_male TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T12_M, se replace
	
use R_T12_M_60.dta
	reg   q077_b_complain_male TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T12_M, se merge

use R_T12_M_63.dta
	reg   q077_c_suggest_male TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T12_M, se merge

use R_T12_M_66.dta
	reg   q077_d_meetings_male TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T12_M, se merge

use R_T12_M_69.dta
	reg   q077_e_obey_male TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T12_M, se merge

use R_T12_M_72.dta
	reg   q077_f_taxes_male TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T12_M, se merge

use R_T12_M_75.dta
	reg   q077_g_support_male TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T12_M, se merge

use R_T12_ME_78.dta
	reg   mfi_T12_m TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T12_M, se merge
	
	clear	
	
************************************************************************************************************************
* TABLE 12: OBLIGATION AS A CITIZEN TO PARTICIPATE - FOR ALL
************************************************************************************************************************

use R_T12_A_58.dta
	reg  q077_a_vote TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T12_A, se replace
	
use R_T12_A_61.dta
	reg   q077_b_complain TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T12_A, se merge

use R_T12_A_64.dta
	reg   q077_c_suggest TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T12_A, se merge

use R_T12_A_67.dta
	reg   q077_d_meetings TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T12_A, se merge

use R_T12_A_70.dta
	reg   q077_e_obey TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T12_A, se merge

use R_T12_A_73.dta
	reg   q077_f_taxes TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T12_A, se merge

use R_T12_A_76.dta
	reg   q077_g_support TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T12_A, se merge

use R_T12_ME_79.dta
	reg   mfi_T12 TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T12_A, se merge
	
	clear	

************************************************************************************************************************
* TABLE 13: COL1: PRESENCE OF ACCOUNTABILITY MECHANISM (FOCUS GROUP)
************************************************************************************************************************

use R_T13_1_80, clear
	xi: reg   DA_MECHANISMS_EXT  TUUNGANE   [pweight= WEIGHT], cluster(CDCCODE) 
	outreg using T13, se replace

use R_T13_1_81, clear
	xi: reg   DA_MECHANISMS_COMMUN  TUUNGANE   [pweight= WEIGHT], cluster(CDCCODE) 
	outreg using T13, se merge

use R_T13_1_82, clear
	xi: reg   DA_NO_MECHANISM TUUNGANE   [pweight= WEIGHT], cluster(CDCCODE) 
	outreg using T13, se merge

************************************************************************************************************************
* TABLE 13: COL2: PRESENCE OF ACCOUNTING MECHANISM (INTERVIEW DR)
************************************************************************************************************************

use R_T13_2_83.dta
	reg DR_MECHANISMS_EXT  TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T13, se merge
	
use R_T13_2_84.dta
	reg DR_MECHANISMS_COMM  TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T13, se merge
	 
use R_T13_2_85.dta
	reg DR_REALLYNO_MECHANISM  TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T13, se merge

************************************************************************************************************************
* TABLE 13: COL3: PRESENCE OF ACCOUNTING MECHANISM (INTERVIEW RANDOM VILLAGERS)
************************************************************************************************************************

use R_T13_3_86.dta
	reg qr015_external_committee TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T13, se merge
 
use R_T13_3_87.dta
	reg qr015_community TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T13, se merge

use R_T13_3_88.dta
	reg qr015_none TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T13, se merge
	
** ADD THE TABLE 13 MEAN AVERAGE COLUMN AS WELL:

use R_T13_ME_89, clear
	reg mft_T13 TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T13, se merge

	clear
	
************************************************************************************************************************
* TABLE 14: COMPLAINTS: PRIVATELY EXPRESSED 
************************************************************************************************************************

use R_T14_90.dta
	reg qr026a_length TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T14, se replace
 
use R_T14_91.dta
	reg qr026b_rapid_behavior TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T14, se merge

use R_T14_92.dta
	reg qr026c_unimportant TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T14, se merge

use R_T14_93.dta
	reg qr026d_reduced_help TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T14, se merge
 
use R_T14_94.dta
	reg qr026e_no_influence TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T14, se merge
 
use R_T14_95.dta
	reg qr026f_disagreement TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T14, se merge
 
use R_T14_96.dta
	reg qr026g_steps TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T14, se merge
 
use R_T14_97.dta
	reg qr026h_lack_info TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T14, se merge
 
use R_T14_98.dta
	reg qr026i_fund_misuse TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T14, se merge
 
use R_T14_99.dta
	reg qr026j_allocation TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T14, se merge
 
use R_T14_100.dta
	reg qr026k_conflicts TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T14, se merge
 
use R_T14_101.dta
	reg qr026l_controled_chef TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T14, se merge
 
use R_T14_102.dta
	reg qr026m_unrepresented TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T14, se merge
 
use R_T14_103.dta
	reg ME_PRIV_COMPLAINTS TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T14, se merge
 
	clear
	
************************************************************************************************************************
* TABLE 15: INFLUENCE OF TUUNGANE ON COMPLAINTS ABOUT RAPID CONDITIONAL ON PROJECT QUALITY
************************************************************************************************************************

use R_T15_104, clear
	reg  ME_PRIV_COMPLAINTS da109_share_not_verifiable COMPLAINTS_INTERACTION TUUNGANE [pweight= WEIGHT], cluster(CDCCODE)
	outreg using T15, se replace

	* PREANALYSIS PLAN ANALYSIS:
	reg  ME_PRIV_COMPLAINTS TUUNGANE da109_share_not_verifiable [pweight= WEIGHT], cluster(CDC)
	outreg using T15, se merge

	clear
												****************
												** EFFICIENCY **
												****************
		
************************************************************************************************************************
* TABLE 16: Existence and Quality of Accounting
************************************************************************************************************************

use R_T16_105.dta
	reg ACCOUNTING_FORM TUUNGANE [pweight= WEIGHT]
	outreg using T16, se replace
	
use R_T16_106.dta
	reg ACCOUNTED_EVAL TUUNGANE [pweight= WEIGHT]
	outreg using T16, se merge

use R_T16_107.dta
	reg ACCOUNTED_COMM TUUNGANE [pweight= WEIGHT]
	outreg using T16, se merge

use R_T16_108.dta
	reg PART_JUSTIFIED TUUNGANE [pweight= WEIGHT]
	outreg using T16, se merge

use R_T16_109.dta
	reg PART_CREDIBLY_JUSTIFIED TUUNGANE [pweight= WEIGHT]
	outreg using T16, se merge

use R_T16_110.dta
	reg mft_T16 TUUNGANE [pweight= WEIGHT]
	outreg using T16, se merge

	clear

************************************************************************************************************************
* FIGURE 13: Health Knowledge
************************************************************************************************************************

use R_F13, clear
	hist SUM_HEALTH_INFO, freq by(TUU) disc
	graph export F13.png, replace
	
************************************************************************************************************************
* TABLE 17: Level of Health Knowledge
************************************************************************************************************************

use R_T17_111, clear
	reg  SUM_HEALTH_INFO  TUUNGANE RAPIDxTUUNGANE  RAPID [pweight= WEIGHT] if DML==1, cluster(CDC)
	outreg using T17, se replace

	clear
	
************************************************************************************************************************
* TABLE 18: SEEKING SUPPORT FROM EXTERNAL ACTORS
************************************************************************************************************************

use R_T18_115.dta
	reg q065_health_lobby TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T18, se replace

use R_T18_116.dta
	reg  q066_edu_lobby TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T18, se merge
	
use R_T18_117.dta
	reg q067_oth_lobby TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T18, se merge

use R_T18_118.dta
	reg q068_ngo_lobby TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T18, se merge

use R_T18_119.dta
	reg mft_T18 TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T18, se merge

	clear
	
												******************
												** TRANSPARENCY **
												******************

************************************************************************************************************************
* FIGURE 14: Village Knowledge of Project Funds
************************************************************************************************************************

use R_F14, clear
	hist qr002_project_amount if qr002_project_amount<=1100, freq by(TUU) bin(25) xlab(-1 250 500 750 1000, valuelabel)
	graph export F14.png, replace

************************************************************************************************************************
* TABLE 19: Knowledge of Project Amount
************************************************************************************************************************

use R_T19_120.dta
	reg qr002CORRECT TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T19, se replace
	
use R_T19_121.dta
	reg DISTANCE_FROM_1000 TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T19, se merge
	
	clear
	
************************************************************************************************************************
* TABLE 20: WILLINGNESS TO SEEK INFORMATION
************************************************************************************************************************

use R_T20_122.dta
	reg qi003_accept TUU [pweight= WEIGHT], cluster(CDC)
	outreg using T20, se replace
	
	clear
	
												*************
												** CAPTURE **
												*************

************************************************************************************************************************
* TABLE 21: Traceability of money
************************************************************************************************************************

use R_T21_123.dta, clear
	reg  da109_verifiable TUU [pweight= WEIGHT]
	outreg using T21, se replace

************************************************************************************************************************
* FIGURE 15: Amount not verifiable
************************************************************************************************************************

	hist da109_verifiable, freq by(TUU) bin(20)	
	graph export F15.png, replace

************************************************************************************************************************
* TABLE 22: Proportion of respondents who received transfers from RAPID
************************************************************************************************************************

use R_T22_124.dta, clear
	reg PROP1 TUU [pweight= WEIGHT], cluster(CDCCODE)
	outreg using T22, se replace

use R_T22_125.dta
	reg PROP2 TUU [pweight= WEIGHT], cluster(CDCCODE)
	outreg using T22, se merge
	
************************************************************************************************************************
* FIGURE 17: Proportion of beneficiaries
************************************************************************************************************************

use R_F17
	hist proportion, freq by(TUUNGANE)
	graph export F17.png, replace
	
************************************************************************************************************************
* TABLE 23: Mean Deviation of Benefits Distributed
************************************************************************************************************************

use R_T23_126.dta, clear
	reg stdev_benefits TUU [pweight= WEIGHT], cluster(CDCCODE)
	outreg using T23, se replace
	
use R_T23_127.dta
	reg stdev2 TUU [pweight= WEIGHT], cluster(CDCCODE)
	outreg using T23, se merge
	
	clear
	
************************************************************************************************************************
* TABLE 24: Tuungane effect on chief dominance
************************************************************************************************************************  

	* CHIEF MORE

use R_T24_128.dta
	reg right1 TUUNGANE tuuchief1 chief1 [pweight= WEIGHT], cluster(CDC)
	outreg using T24_C, replace
	
use R_T24_129.dta
	reg right2 TUUNGANE tuuchief2 chief2  [pweight= WEIGHT], cluster(CDC)
	outreg using T24_C, merge
	
	* MEN MORE

use R_T24_130.dta
	reg right1 TUUNGANE genderTUU gender [pweight= WEIGHT], cluster(CDC)
	outreg using T24_M, replace
	
use R_T24_131.dta
	reg right2 TUUNGANE genderTUU2 gender  [pweight= WEIGHT], cluster(CDC)
	outreg using T24_M, merge
	
	* CHIEF OR MEN MORE

use R_T24_132.dta
	reg right1 TUUNGANE MALEorCHIEF1 MoC_INT1 [pweight= WEIGHT], cluster(CDC)
	outreg using T24_CM, replace
	
use R_T24_133.dta
	reg right2 TUUNGANE MALEorCHIEF2 MoC_INT2  [pweight= WEIGHT], cluster(CDC)
	outreg using T24_CM, merge

	clear
	
												*********************
												** SOCIAL COHESION **
												*********************

************************************************************************************************************************
* TABLE 25: Distribution of Benefits: HH LEVEL 
************************************************************************************************************************

use R_T25
	sum qr003bis_value
	sum qr003bis_value if distribution!=0
	
************************************************************************************************************************
* TABLE 26: Distribution of benefits to migrants
************************************************************************************************************************

use R_T26.dta
	reg qr003bis_value TUU migrant migtuu [pweight= WEIGHT], cluster(CDCCODE)
	outreg using T26, se replace

************************************************************************************************************************
* TABLE 27: Trust
************************************************************************************************************************  

use R_T27_135.dta
	reg q43_family TUU [pweight= WEIGHT], cluster(CDC)
	outreg using T27, se replace
 
use R_T27_136.dta
	reg  q43_village TUU [pweight= WEIGHT], cluster(CDC)
	outreg using T27, se merge

use R_T27_137.dta
	reg  q043_othvill TUU [pweight= WEIGHT], cluster(CDC)
	outreg using T27, se merge
	 
use R_T27_138.dta
	reg  q043_coeth TUU [pweight= WEIGHT], cluster(CDC)
	outreg using T27, se merge
 
use R_T27_139.dta
	reg  q043_outsider TUU [pweight= WEIGHT], cluster(CDC)
	outreg using T27, se merge
 
use R_T27_140.dta
	reg  q043_xc TUU [pweight= WEIGHT], cluster(CDC)
	outreg using T27, se merge
 
use R_T27_141.dta
	reg  mft_T27 TUU [pweight= WEIGHT], cluster(CDC)
	outreg using T27, se merge

	clear
	
************************************************************************************************************************
* TABLE 28: Cleavages in Village Social Cohesion
************************************************************************************************************************

use R_T28_142.dta
	reg q038_rp TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T28, se replace
 
use R_T28_143.dta
	reg q038_hf TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T28, se merge
	
use R_T28_144.dta
	reg q038_ja TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T28, se merge
 
use R_T28_145.dta
	reg q038_an TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T28, se merge
 
use R_T28_146.dta
	reg q038_religions TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T28, se merge

use R_T28_147.dta
	reg q038_ethnic TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T28, se merge
	
use R_T28_148.dta
	reg q038_elites TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T28, se merge
 
use R_T28_149.dta
	reg q038_other TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T28, se merge
 
use R_T28_150.dta
	reg q038_aucun TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T28, se merge
 
use R_T28_151.dta
	reg mft_T28 TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T28, se merge
  
	clear

************************************************************************************************************************
* TABLE 29: Intervillage Social Cohesion
************************************************************************************************************************ 

use R_T29_152.dta
	reg share_other TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T29, se replace
	
use R_T29_153.dta
	reg share_other_m TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T29, se merge

use R_T29_154.dta
	reg share_other_f TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T29, se merge

	clear
	
												*************
												** WELFARE **
												*************

************************************************************************************************************************
* TABLE 30: Household Income
************************************************************************************************************************

use R_T30_155.dta, clear
	reg HOUSEHOLD_INCOME TUUNGANE [pweight= WEIGHT] , cluster(CDC)
	outreg using T30, se replace
	
************************************************************************************************************************
* FIGURE 18: Household income in the last two weeks ($)
************************************************************************************************************************

	hist HOUSEHOLD_INCOME, freq bin(30)	
	hist HOUSEHOLD_INCOME if HOUSEHOLD_INCOME<=100, freq bin(30) 
	
************************************************************************************************************************
* TABLE 31: HH Member Productivity
************************************************************************************************************************

use R_T31_157.dta
	reg PRODUCTIVE_TIME_FEMALE TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T31, se replace
 
use R_T31_158.dta
	reg PRODUCTIVE_TIME_MALE TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T31, se merge

use R_T31_156.dta
	reg PRODUCTIVE_TIME TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T31, se merge
 
************************************************************************************************************************
* FIGURE 19: Productivity
************************************************************************************************************************

use R_F19
	
	* NOTE: Only works when run as a do-files
	
	#delimit ;
	twoway 
	(kdensity  PRODUCTIVE_TIME_FEMALE [aw=WEIGHT] if PRODUCTIVE_TIME_FEMALE<=100, lcolor(red*1.6) lwidth(thick)) 
	(kdensity  PRODUCTIVE_TIME_MALE [aw=WEIGHT] if PRODUCTIVE_TIME_MALE<=100, lcolor(dknavy*0.7) lwidth(thick) lpattern(dash)), 
	xtitle(Hours of productive time by gender) 
	ytitle(Density) 
	ylabel(,angle(0)) 
	legend(label(1 "Females")
	label(2 "Males"))
	title(Productive hours of work by gender)
	scheme(s2color);
	#delimit cr
	graph export F19.png, replace

************************************************************************************************************************
* TABLE 32: HOUSEHOLD'S AGRICULTURE PRODUCTION
************************************************************************************************************************

use R_T32_159.dta, clear
	reg total_production_value_hh TUU [pweight= WEIGHT], cluster(CDC)
	outreg using T32, se replace
	
	clear
	
************************************************************************************************************************
* TABLE 33: Household Assets
************************************************************************************************************************

use R_T33_160.dta
	reg ASSETS TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T33, se replace
	
use R_T33_161.dta
	reg qe001_a_goats TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T33, se merge

use R_T33_162.dta
	reg qe001_b_chickens TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T33, se merge
	 
use R_T33_163.dta
	reg qe001_c_cows TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T33, se merge
	 
use R_T33_164.dta
	reg qe001_d_porcs TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T33, se merge
	 
use R_T33_165.dta
	reg qe001_e_houses TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T33, se merge
	  
use R_T33_166.dta
	reg qe001_f_rooms TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T33, se merge
	
use R_T33_167.dta
	reg qe001_g_bidons TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T33, se merge
	 
use R_T33_168.dta
	reg qe001_h_chairs TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T33, se merge
	 
use R_T33_169.dta
	reg qe001_i_beds TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T33, se merge
	 
use R_T33_170.dta
	reg qe001_j_matras_mouse TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T33, se merge
	 
use R_T33_171.dta
	reg qe001_k_matras_straw TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T33, se merge
	 
use R_T33_172.dta
	reg qe001_l_buckets TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T33, se merge 

use R_T33_173.dta
	reg qe001_m_bassins TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T33, se merge 

use R_T33_174.dta
	reg qe001_n_lamps TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T33, se merge
 
use R_T33_175.dta
	reg qe001_o_radios TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T33, se merge
 
use R_T33_176.dta
	reg qe001_p_bikes TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T33, se merge
 
use R_T33_177.dta
	reg qe001_q_machettes TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T33, se merge
 
use R_T33_178.dta
	reg qe001_r_pans TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T33, se merge
 
use R_T33_179.dta
	reg qe001_s_dressers TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T33, se merge
 
use R_T33_180.dta
	reg qe001_t_piroques TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T33, se merge
	 
use R_T33_181.dta
	reg qe001_u_cellphones TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T33, se merge
	
	clear

************************************************************************************************************************
* TABLE 34: WALL QUALITY -- HH LEVEL, SELF WEIGHTING
************************************************************************************************************************

use R_T34_182.dta
	reg  QE10_WALL_QUALITY_HIGH TUUNGANE  [pweight= WEIGHT] if TUUN!=. , cluster(CDC)
	outreg using T34, se replace
	
************************************************************************************************************************
* TABLE 35: Days of attendence at school (in the past two weeks)
************************************************************************************************************************

use R_T35_184.dta
	reg DAYS_TO_SCHOOL_FEMALE2  TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T35, se replace

use R_T35_185.dta
	reg  DAYS_TO_SCHOOL_MALE2 TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T35, se merge

use R_T35_183.dta
	reg DAYS_TO_SCHOOL2 TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T35, se merge
 
	clear

************************************************************************************************************************
* TABLE 36: Sickness during last two weeks
************************************************************************************************************************

use R_T36_186.dta
	reg qf020_flu TUUNGANE [pweight= WEIGHT], cluster(CDCCODE)
	outreg using T36, se replace
	
use R_T36_187.dta
	reg qf020_cough TUUNGANE [pweight= WEIGHT], cluster(CDCCODE)
	outreg using T36, se merge
	 
use R_T36_188.dta
	reg qf020_sweat TUUNGANE [pweight= WEIGHT], cluster(CDCCODE)
	outreg using T36, se merge

use R_T36_189.dta
	reg qf020_diarhea TUUNGANE [pweight= WEIGHT], cluster(CDCCODE)
	outreg using T36, se merge
	
use R_T36_190.dta
	reg qf020_blood TUUNGANE [pweight= WEIGHT], cluster(CDCCODE)
	outreg using T36, se merge
 
use R_T36_191.dta
	reg qf021_sick_adults TUUNGANE [pweight= WEIGHT], cluster(CDCCODE)
	outreg using T36, se merge
 
use R_T36_ME_192.dta
	reg m_CHILD_ADULT TUUNGANE [pweight= WEIGHT], cluster(CDCCODE)
	outreg using T36, se merge
 
	clear
	
************************************************************************************************************************
* FIGURE 20: Use of Village Utilities
************************************************************************************************************************

use R_T37_193.dta
	hist q063_well, freq
	graph export F20_well.png, replace

use R_T37_194.dta
	hist q063_primary, freq 
	graph export F20_primary.png, replace

use R_T37_195.dta
	hist q063_secondary, freq 
	graph export F20_secondary.png, replace

use R_T37_196.dta
	hist q063_healthcenter, freq
	graph export F20_healthcenter.png, replace

use R_T37_197.dta
	hist q063_maternity, bin(10) freq 
	graph export F20_maternity.png, replace
	
use R_T37_198.dta
	hist q063_bridge, freq 
	graph export F20_bridge.png, replace

use R_T37_199.dta
	hist q063_irrigation, freq
	graph export F20_irrigation.png, replace
	
use R_T37_200.dta
	hist q063_meeting, freq  
	graph export F20_meeting.png, replace

use R_T37_201.dta
	hist q063_church, freq  
	graph export F20_church.png, replace

use R_T37_203.dta
	hist q063_govdoc, freq 
	graph export F20_govdoc.png, replace

use R_T37_202.dta
	hist q063_road, freq 
	graph export F20_road.png, replace
	
************************************************************************************************************************
* TABLE 37: Use of Village Utilities: HOUSEHOLD LEVEL
************************************************************************************************************************

use R_T37_193.dta, clear
	reg q063_well TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T37, se replace
 
use R_T37_194.dta
	reg q063_primary TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T37, se merge
 
use R_T37_195.dta
	reg q063_secondary TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T37, se merge
 
use R_T37_196.dta
	reg q063_healthcenter TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T37, se merge
 
use R_T37_197.dta
	reg q063_maternity TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T37, se merge
 
use R_T37_198.dta
	reg q063_bridge TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T37, se merge
 
use R_T37_199.dta
	reg q063_irrigation TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T37, se merge
 
use R_T37_200.dta
	reg q063_meeting TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T37, se merge
 
use R_T37_201.dta
	reg q063_church TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T37, se merge
 
use R_T37_202.dta
	reg q063_road TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T37, se merge
 
use R_T37_203.dta
	reg q063_govdoc TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T37, se merge
 
use R_T37_204.dta
	reg mft_T37 TUUNGANE [pweight= WEIGHT], cluster(CDC)
	outreg using T37, se merge
  
												************
												** GENDER **
												************

************************************************************************************************************************
* ITEM 14
************************************************************************************************************************
		
use Item14.dta, clear
            reg sante2 NP_PI if PILOT_POOL==1, cluster(CDCCODE)
			outreg using Item_14, se replace
			foreach depvar of varlist education2 transport2 watsan2 agr2 autre2{
					reg `depvar' NP_PI if PILOT_POOL==1, cluster(CDCCODE)
					outreg using Item_14, se merge
			}

	clear
	
************************************************************************************************************************
* ITEM 15
************************************************************************************************************************

use Item15_16, clear
		reg qg008_women TUUN [pweight =  vWEIGHT], cluster(CDCCODE)
		outreg using Item_15, se replace
		foreach depvar of varlist qg009_mistreatment qg010_socioadmin qg011_women_pres  mfi_GenAtt2 {
		reg `depvar' TUUN [pweight =  vWEIGHT], cluster(CDCCODE)
		outreg using Item_15, se merge
    }

	clear
	
************************************************************************************************************************
* ITEM 16
************************************************************************************************************************

use Item15_16, clear
        reg qg008_women NP_PI [pweight =  vWEIGHT] if PILOT_POOL==1, cluster(CDCCODE)
		outreg using Item_16, replace
		foreach depvar of varlist qg009_mistreatment qg010_socioadmin qg011_women_pres  mfi_GenAtt2 {
        reg `depvar' NP_PI [pweight =  vWEIGHT] if PILOT_POOL==1, cluster(CDCCODE)
		outreg using Item_16, merge
		}
	
exit
	